package com.cy.pj.module.controller;

import com.cy.pj.module.pojo.ResponseResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class JsonObjectController {

    @RequestMapping("/doConvertResponseToJson")
    public ResponseResult doConvertResponseToJson(){
        ResponseResult rs = new ResponseResult();
        rs.setCode(233);
        rs.setMessage("OK");
        return rs;
        //当此对象在返回时候,spring web模块会调用jackson api
        //,将返回值转换成json格式
    }
}
